<template>
  <a-modal title='查看详情' :width="800" :maskClosable="false" :visible="visible" @cancel="visible = false">
    <a slot="footer">
      <a-button @click="visible = false">关闭</a-button>
    </a>
    <a-spin :indicator="indicator" :spinning="spinning" :tip="tip">
      <div class="spin-content">
        <a-descriptions :column="1">
          <a-descriptions-item label="房间地址">
            {{  detail.Address }}
          </a-descriptions-item>
          <a-descriptions-item label="人员姓名">
            {{ detail.personName }}
          </a-descriptions-item>
          <a-descriptions-item label="电话号码">
            {{ detail.phone }}
          </a-descriptions-item>
          <a-descriptions-item label="身份证号">
            {{ detail.idNumber }}
          </a-descriptions-item>
          <a-descriptions-item label="租住性质">
            {{`${detail.RentalNatureName}`}}
          </a-descriptions-item>

          <a-descriptions-item label="备注">
            <!-- <img :src="detail.readingPicUrl" @click="handlePreview(detail.readingPicUrl)" alt=""> -->
            {{ detail.remark }}
          </a-descriptions-item>

        </a-descriptions>

      </div>
    </a-spin>

  </a-modal>
</template>

<script>

export default {
  name: "",
  components: {},
  props: {
    actionType: {
      type: String,
      required: false,
      default: "add",
    },
    type: {
      type: String,
      required: false,
    },
  },
  data () {
    return {
      visible: false,
      button_loading: false,
      spinning: false,
      tip: null,
      indicator: <a-icon type="loading" style="font-size: 24px" spin />,
      detail: {}
    };
  },
  computed: {},
  watch: {},
  created () { },
  mounted () { },
  methods: {
    view (data) {
      if (data) {
        Object.assign(this, {

          visible: true,
          CodeDisabled: false,
          currentId: data.id,
        });
        this.detail = data;
      }
    },
    handlePreview (file) {
      // this.$refs.photomodal.view(file);
    },
  },
};
</script>
<style>
/** lang='less' scoped */
</style>
